home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / DialogLib / DialogModalET.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-12  |  914 b   |  44 lines  |  [TEXT/KAHL]

  1. /* event table functions, called from event library in response to
  2.     events
  3.     
  4.     93/10/18 aih - created */
  5.     
  6. #include "EventLib.h"
  7. #include "DialogModalLib.h"
  8.  
  9. static EventTableType gEventTable;
  10.     
  11. static TicksType adjustsleep(EventObjectType object)
  12. {
  13.     return DlgModalAdjustSleep(object);
  14. }
  15.  
  16. static void update(EventObjectType object)
  17. {
  18.     DlgModalUpdate(object);
  19. }
  20.  
  21. static void activate(EventObjectType object, Boolean activate)
  22. {
  23.     DlgModalActivate(object, activate);
  24. }
  25.  
  26. static void prefilter(EventObjectType object, EventRecord *event)
  27. {
  28.     DlgModalFilterPre(object, event);
  29. }
  30.  
  31. const /* EventTableType */ void *DlgModalEventTable(void)
  32. {
  33.     return(&gEventTable);
  34. }
  35.  
  36. void DlgModalEventTableRegister(void)
  37. {
  38.     gEventTable.focusWindow.adjustsleep = adjustsleep;
  39.     gEventTable.focusWindow.prefilter = prefilter;
  40.     gEventTable.window.update = update;
  41.     gEventTable.window.activate = activate;
  42.     EventTableRegister(&gEventTable);
  43. }
  44.